// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------

#include "stdafx.h"


BOOL APIENTRY DllMain(
    HMODULE module,
    DWORD reason,
    LPVOID reserved)
{
    UNREFERENCED_PARAMETER(module);
    UNREFERENCED_PARAMETER(reserved);

    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}


//
// WARNING: 
//
// The signature below MUST exactly match (including the parameter names)
// with the signature generated by MIDL in the FabricReliableMessaging_.h file. 
// Otherwise the linker does not apply the extern "C" specifier and exports 
// this function as C++ name mangled function instead of C style function.
// 
/* [entry] */ HRESULT CreateReliableSessionManager( 
    /* [in] */ __RPC__in HOST_SERVICE_PARTITION_INFO *servicePartitionInfo,
    /* [in] */ __RPC__in FABRIC_URI callingServiceInstanceName,
    /* [in] */ FABRIC_PARTITION_KEY_TYPE partitionKeyType,
    /* [in] */ __RPC__in const void *partitionKey,
    /* [retval][out] */ __RPC__deref_out_opt IFabricReliableSessionManager **sessionManager)
{
    Common::DllConfig::GetConfig();

    return ReliableMessaging::ComFabricReliableSessionManager::Create(
		servicePartitionInfo,
        callingServiceInstanceName, 
		partitionKeyType,
		partitionKey,
		sessionManager);
}
